package com.wangp.springbootsource.event;

import org.springframework.stereotype.Component;

/**
 * <pre>
 * classname SnowListener
 * description
 * </pre>
 *
 * @author wangp
 * @date 2020/9/2 22:24
 **/
@Component
public class SnowListener implements WeatherListener {

    @Override
    public void onWeatherEvent(WeatherEvent event) {
        if (event instanceof SnowEvent) {
            System.out.println("snowing" + event.getWeather());
        }
    }
}
